import api from '@/api/api'

const FILE_URI = {
  DOWNLOAD_URL: '/file//download_url',
  UPLOAD_URL: '/file/upload_url',
}

// 用户相关API封装
export const fileApi = {
  downloadUrl(bucketName: string, objectName: string): Promise<string> {
    return api.post(FILE_URI.DOWNLOAD_URL, { bucketName: bucketName, objectName: objectName })
  },
  uploadUrl(bucketName: string, objectName: string): Promise<string> {
    return api.post(FILE_URI.UPLOAD_URL, { bucketName: bucketName, objectName: objectName })
  }
}
